package com.hao.demo.springcloud.client.provider.impl;

import com.hao.demo.springcloud.client.provider.DemoProvider;
import com.hao.demo.springcloud.client.provider.dto.DemoDTO;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;

@Component
public class DemoProviderImpl implements DemoProvider {

    @Override
    public String queryByName(@NotNull(message = "名称不能为空") String name) {
        return "访问量过大，请稍后重试！";
    }

    @Override
    public String createDemo(DemoDTO demoDTO) {
        return "访问量过大，请稍后重试！";
    }

    @Override
    public String queryDemoDTO(DemoDTO demoDTO) {
        return "访问量过大，请稍后重试！";
    }
}
